import { http } from '@/utils/https'
import type { HarDwareDetai,EditHarDware } from '@/types/equipment'
/**
 * 获取设备详细硬件信息
 */
export const getHarDwareDetailApi = (deviceNum: string) => {
  return http<HarDwareDetai>({
    url: `/slp/device/detailByDeviceNum/${deviceNum}`,
    method: 'POST',
  })
}

/** 
 * 修改设备信息 
 */
export const updateHarDwareDetailApi = (data: EditHarDware) => {
  return http({
    url: `/slp/device/setDeviceInfo`,
    method: 'POST',
    data,
  })
}
//生成设备信息二维码
export const getQrCodeApi = (context: string) => {
  return http<string>({
    url: `/slp/createRQCode/${context}`,
    method: 'POST',
  })
}